package com.ruoyi.project.system.controller;

import com.ruoyi.project.system.domain.SysDiscount;
import com.ruoyi.project.system.service.SysDiscountService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (SysDiscount)表控制层
 *
 * @author makejava
 * @since 2020-03-04 19:16:56
 */
@RestController
@RequestMapping("sysDiscount")
public class SysDiscountController {
    /**
     * 服务对象
     */
    @Resource
    private SysDiscountService sysDiscountService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public SysDiscount selectOne(Long id) {
        return this.sysDiscountService.queryById(id);
    }

}